~ubuntu-branches/ubuntu/gutsy/vorbis-tools/gutsy

« back to all changes in this revision

Viewing changes to ogg123/playlist.h

  • Committer: Bazaar Package Importer
  • Author(s): Jesus Climent
  • Date: 2005-04-10 09:22:24 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20050410092224-xtukpa3qghghhjje
Tags: 1.0.1-1.3
* Authorized NMU.
* Modified alsa to mention alsa09 (although the device might be nowadays
  alsa, back, since alsa1.0 has been already released). (Closes: #258286)
* Modified the manpage/help message for vorbiscomment to make it a bit more
  userfiendly: Closes: #252531.
* Added oggdec to the long description field, so that it triggers apt-cache
  searches: Closes: #274894.
* Typos in manpages: Closes: #302150.
* Escaped dashes in manpage: Closes: #264365.
* Quiet option is actually with -Q, not -q (Closes: #211289) Reported
  upstream but patched for Debian.
* Change input.wav with inputfile, since we accept flac-formated files:
  Closes: #262509.
* Translation bits:
  * Updated translation hu.po: Closes: #272037.
  * French translation correction: Encodage -> Codage (Closes: #248431).
  * debian/rules: remove .gmo's to avoid clash with uploaded tarball.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/********************************************************************
 
2
 *                                                                  *
 
3
 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
 
4
 * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY *
 
5
 * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE.    *
 
6
 * PLEASE READ THESE TERMS BEFORE DISTRIBUTING.                     *
 
7
 *                                                                  *
 
8
 * THE Ogg123 SOURCE CODE IS (C) COPYRIGHT 2000-2002                *
 
9
 * by Kenneth C. Arnold <ogg@arnoldnet.net> AND OTHER CONTRIBUTORS  *
 
10
 * http://www.xiph.org/                                             *
 
11
 *                                                                  *
 
12
 ********************************************************************
 
13
 
 
14
 last mod: $Id: playlist.h,v 1.1 2002/07/06 03:23:13 volsung Exp $
 
15
 
 
16
 ********************************************************************/
 
17
 
 
18
#ifndef __PLAYLIST_H__
 
19
#define __PLAYLIST_H__
 
20
 
 
21
typedef struct playlist_element_t {
 
22
  char *filename;
 
23
  struct playlist_element_t *next;
 
24
} playlist_element_t;
 
25
 
 
26
/* Actual playlist structure */
 
27
typedef struct playlist_t {
 
28
 
 
29
  /* Linked list with empty head node */
 
30
  playlist_element_t *head;
 
31
 
 
32
  /* Keep track of this for speedy appends */
 
33
  playlist_element_t *last;
 
34
} playlist_t;
 
35
 
 
36
playlist_t *playlist_create();
 
37
void playlist_destroy(playlist_t *list);
 
38
 
 
39
/* All of the playlist_append_* functions return 
 
40
   1 if append was successful
 
41
   0 if failure (either directory could not be accessed or playlist on disk
 
42
   could not be opened)
 
43
*/
 
44
 
 
45
 
 
46
/* Add this filename to the playlist.  Filename will be strdup()'ed.  Note
 
47
   that this function will never fail. */
 
48
int playlist_append_file(playlist_t *list, char *filename);
 
49
 
 
50
/* Recursively adds files from the directory and subdirectories */
 
51
int playlist_append_directory(playlist_t *list, char *dirname);
 
52
 
 
53
/* Opens a file containing filenames, one per line, and adds them to the
 
54
   playlist */
 
55
int playlist_append_from_file(playlist_t *list, char *playlist_filename);
 
56
 
 
57
/* Return the number of items in the playlist */
 
58
int playlist_length(playlist_t *list);
 
59
 
 
60
/* Convert the playlist to an array of strings.  Strings are deep copied. 
 
61
   Size will be set to the number of elements in the array. */
 
62
char **playlist_to_array(playlist_t *list, int *size);
 
63
 
 
64
/* Deallocate array and all contained strings created by playlist_to_array. */
 
65
void playlist_array_destroy(char **array, int size);
 
66
 
 
67
 
 
68
#endif /* __PLAYLIST_H__ */