annotate gui/win32/playlist.h @ 29130:33956c5f5005

Reemit the ID_AID_x_LANG for the track. This allows the identification of the audio track by language code (en or es) rather than by ID (128 or 129). patch by Kevin DeKorte, kdekorte gmail com
author diego
date Sat, 11 Apr 2009 13:51:02 +0000
parents 9e739bdb049c
children 844786b8f768
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
1 /*
23079
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
2 * MPlayer GUI for Win32
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
3 * Copyright (C) 2003 Sascha Sommer <saschasommer@freenet.de>
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
4 * Copyright (C) 2006 Erik Augustson <erik_27can@yahoo.com>
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
5 * Copyright (C) 2006 Gianluigi Tiesi <sherpya@netfarm.it>
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
6 *
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
7 * This file is part of MPlayer.
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
8 *
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
9 * MPlayer is free software; you can redistribute it and/or modify
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
10 * it under the terms of the GNU General Public License as published by
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
12 * (at your option) any later version.
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
13 *
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
14 * MPlayer is distributed in the hope that it will be useful,
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
17 * GNU General Public License for more details.
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
18 *
26457
9ba6d4487292 Use standard GPL header.
diego
parents: 26136
diff changeset
19 * You should have received a copy of the GNU General Public License along
9ba6d4487292 Use standard GPL header.
diego
parents: 26136
diff changeset
20 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
9ba6d4487292 Use standard GPL header.
diego
parents: 26136
diff changeset
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23079
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
22 */
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
23
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
24 #ifndef MPLAYER_GUI_PLAYLIST_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
25 #define MPLAYER_GUI_PLAYLIST_H
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
26
26136
a8eb9fd1ac21 Add missing header #includes to fix 'make checkheaders'.
diego
parents: 26029
diff changeset
27 #include <windows.h>
a8eb9fd1ac21 Add missing header #includes to fix 'make checkheaders'.
diego
parents: 26029
diff changeset
28
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
29 typedef struct
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
30 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
31 char *filename;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
32 char *artist;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
33 char *title;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
34 int duration;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
35 } pl_track_t;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
36
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
37 typedef struct playlist_t playlist_t;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
38 struct playlist_t
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
39 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
40 int current; /* currently used track */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
41 int trackcount; /* number of tracknumber */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
42 pl_track_t **tracks; /* tracklist */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
43 void (*add_track)(playlist_t* playlist, const char *filename, const char *artist, const char *title, int duration);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
44 void (*remove_track)(playlist_t* playlist, int number);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
45 void (*moveup_track)(playlist_t* playlist, int number);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
46 void (*movedown_track)(playlist_t* playlist, int number);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
47 void (*dump_playlist)(playlist_t* playlist);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
48 void (*sort_playlist)(playlist_t* playlist, int opt);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
49 void (*clear_playlist)(playlist_t* playlist);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
50 void (*free_playlist)(playlist_t* playlist);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
51 };
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
52
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
53 #define SORT_BYFILENAME 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
54 #define SORT_BYARTIST 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
55 #define SORT_BYTITLE 3
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
56 #define SORT_BYDURATION 4
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
57
28051
9e739bdb049c Get rid of pointless 'extern' keywords.
diego
parents: 26457
diff changeset
58 playlist_t *create_playlist(void);
9e739bdb049c Get rid of pointless 'extern' keywords.
diego
parents: 26457
diff changeset
59 BOOL adddirtoplaylist(playlist_t *playlist, const char* path, BOOL recursive);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
60
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
61 #endif /* MPLAYER_GUI_PLAYLIST_H */